Optimal. Leaf size=95 \[ -\frac {i \text {ArcTan}\left (\frac {\sqrt {2-3 i} \sqrt {\tan (c+d x)}}{\sqrt {3-2 \tan (c+d x)}}\right )}{\sqrt {2-3 i} d}+\frac {i \text {ArcTan}\left (\frac {\sqrt {2+3 i} \sqrt {\tan (c+d x)}}{\sqrt {3-2 \tan (c+d x)}}\right )}{\sqrt {2+3 i} d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {3656, 924, 95,
211} \begin {gather*} \frac {i \text {ArcTan}\left (\frac {\sqrt {2+3 i} \sqrt {\tan (c+d x)}}{\sqrt {3-2 \tan (c+d x)}}\right )}{\sqrt {2+3 i} d}-\frac {i \text {ArcTan}\left (\frac {\sqrt {2-3 i} \sqrt {\tan (c+d x)}}{\sqrt {3-2 \tan (c+d x)}}\right )}{\sqrt {2-3 i} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 95
Rule 211
Rule 924
Rule 3656
Rubi steps
\begin {align*} \int \frac {\sqrt {\tan (c+d x)}}{\sqrt {3-2 \tan (c+d x)}} \, dx &=\frac {\text {Subst}\left (\int \frac {\sqrt {x}}{\sqrt {3-2 x} \left (1+x^2\right )} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (-\frac {1}{2 \sqrt {3-2 x} (i-x) \sqrt {x}}+\frac {1}{2 \sqrt {3-2 x} \sqrt {x} (i+x)}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {\text {Subst}\left (\int \frac {1}{\sqrt {3-2 x} (i-x) \sqrt {x}} \, dx,x,\tan (c+d x)\right )}{2 d}+\frac {\text {Subst}\left (\int \frac {1}{\sqrt {3-2 x} \sqrt {x} (i+x)} \, dx,x,\tan (c+d x)\right )}{2 d}\\ &=-\frac {\text {Subst}\left (\int \frac {1}{i-(3-2 i) x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {3-2 \tan (c+d x)}}\right )}{d}+\frac {\text {Subst}\left (\int \frac {1}{i+(3+2 i) x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {3-2 \tan (c+d x)}}\right )}{d}\\ &=-\frac {i \tan ^{-1}\left (\frac {\sqrt {2-3 i} \sqrt {\tan (c+d x)}}{\sqrt {3-2 \tan (c+d x)}}\right )}{\sqrt {2-3 i} d}+\frac {i \tan ^{-1}\left (\frac {\sqrt {2+3 i} \sqrt {\tan (c+d x)}}{\sqrt {3-2 \tan (c+d x)}}\right )}{\sqrt {2+3 i} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 103, normalized size = 1.08 \begin {gather*} \frac {i \left (\sqrt {2+3 i} \text {ArcTan}\left (\frac {\sqrt {\frac {2}{13}+\frac {3 i}{13}} \sqrt {3-2 \tan (c+d x)}}{\sqrt {\tan (c+d x)}}\right )+\sqrt {-2+3 i} \tanh ^{-1}\left (\frac {\sqrt {-\frac {2}{13}+\frac {3 i}{13}} \sqrt {3-2 \tan (c+d x)}}{\sqrt {\tan (c+d x)}}\right )\right )}{\sqrt {13} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(433\) vs.
\(2(77)=154\).
time = 1.03, size = 434, normalized size = 4.57
method | result | size |
derivativedivides | \(\frac {3 \sqrt {3-2 \tan \left (d x +c \right )}\, \sqrt {-\frac {\tan \left (d x +c \right ) \left (-3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right )^{2}}}\, \left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right ) \left (\sqrt {-4+2 \sqrt {13}}\, \sqrt {13}\, \sqrt {2 \sqrt {13}+4}\, \arctanh \left (\frac {\left (2+\sqrt {13}\right ) \left (\sqrt {13}+2+3 \tan \left (d x +c \right )\right ) \left (17 \sqrt {13}-52\right ) \sqrt {13}}{351 \sqrt {-4+2 \sqrt {13}}\, \left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right ) \sqrt {-\frac {\tan \left (d x +c \right ) \left (-3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right )^{2}}}}\right )-2 \sqrt {-4+2 \sqrt {13}}\, \sqrt {2 \sqrt {13}+4}\, \arctanh \left (\frac {\left (2+\sqrt {13}\right ) \left (\sqrt {13}+2+3 \tan \left (d x +c \right )\right ) \left (17 \sqrt {13}-52\right ) \sqrt {13}}{351 \sqrt {-4+2 \sqrt {13}}\, \left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right ) \sqrt {-\frac {\tan \left (d x +c \right ) \left (-3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right )^{2}}}}\right )+8 \arctan \left (\frac {6 \sqrt {13}\, \sqrt {-\frac {\tan \left (d x +c \right ) \left (-3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right )^{2}}}}{\sqrt {26 \sqrt {13}+52}}\right ) \sqrt {13}-34 \arctan \left (\frac {6 \sqrt {13}\, \sqrt {-\frac {\tan \left (d x +c \right ) \left (-3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right )^{2}}}}{\sqrt {26 \sqrt {13}+52}}\right )\right )}{2 d \sqrt {\tan \left (d x +c \right )}\, \sqrt {2 \sqrt {13}+4}\, \left (-3+2 \tan \left (d x +c \right )\right ) \left (17 \sqrt {13}-52\right )}\) | \(434\) |
default | \(\frac {3 \sqrt {3-2 \tan \left (d x +c \right )}\, \sqrt {-\frac {\tan \left (d x +c \right ) \left (-3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right )^{2}}}\, \left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right ) \left (\sqrt {-4+2 \sqrt {13}}\, \sqrt {13}\, \sqrt {2 \sqrt {13}+4}\, \arctanh \left (\frac {\left (2+\sqrt {13}\right ) \left (\sqrt {13}+2+3 \tan \left (d x +c \right )\right ) \left (17 \sqrt {13}-52\right ) \sqrt {13}}{351 \sqrt {-4+2 \sqrt {13}}\, \left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right ) \sqrt {-\frac {\tan \left (d x +c \right ) \left (-3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right )^{2}}}}\right )-2 \sqrt {-4+2 \sqrt {13}}\, \sqrt {2 \sqrt {13}+4}\, \arctanh \left (\frac {\left (2+\sqrt {13}\right ) \left (\sqrt {13}+2+3 \tan \left (d x +c \right )\right ) \left (17 \sqrt {13}-52\right ) \sqrt {13}}{351 \sqrt {-4+2 \sqrt {13}}\, \left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right ) \sqrt {-\frac {\tan \left (d x +c \right ) \left (-3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right )^{2}}}}\right )+8 \arctan \left (\frac {6 \sqrt {13}\, \sqrt {-\frac {\tan \left (d x +c \right ) \left (-3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right )^{2}}}}{\sqrt {26 \sqrt {13}+52}}\right ) \sqrt {13}-34 \arctan \left (\frac {6 \sqrt {13}\, \sqrt {-\frac {\tan \left (d x +c \right ) \left (-3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2-3 \tan \left (d x +c \right )\right )^{2}}}}{\sqrt {26 \sqrt {13}+52}}\right )\right )}{2 d \sqrt {\tan \left (d x +c \right )}\, \sqrt {2 \sqrt {13}+4}\, \left (-3+2 \tan \left (d x +c \right )\right ) \left (17 \sqrt {13}-52\right )}\) | \(434\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {\tan {\left (c + d x \right )}}}{\sqrt {3 - 2 \tan {\left (c + d x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 641 vs.
\(2 (67) = 134\).
time = 0.89, size = 641, normalized size = 6.75 \begin {gather*} -\frac {1}{676} \, \sqrt {2} {\left (\frac {2 \, {\left (3 \, d^{2} \sqrt {169 \, \sqrt {13} - 598} - 2 \, d \sqrt {169 \, \sqrt {13} + 598} {\left | d \right |}\right )} \arctan \left (\frac {13 \, \left (\frac {4}{13}\right )^{\frac {3}{4}} {\left (2 \, \left (\frac {4}{13}\right )^{\frac {1}{4}} \sqrt {-\frac {1}{13} \, \sqrt {13} + \frac {1}{2}} + \frac {\sqrt {2} \sqrt {\tan \left (d x + c\right )} - \sqrt {3}}{\sqrt {-2 \, \tan \left (d x + c\right ) + 3}} - \frac {\sqrt {-2 \, \tan \left (d x + c\right ) + 3}}{\sqrt {2} \sqrt {\tan \left (d x + c\right )} - \sqrt {3}}\right )}}{8 \, \sqrt {\frac {1}{13} \, \sqrt {13} + \frac {1}{2}}}\right )}{d^{3}} + \frac {2 \, {\left (3 \, d^{2} \sqrt {169 \, \sqrt {13} - 598} - 2 \, d \sqrt {169 \, \sqrt {13} + 598} {\left | d \right |}\right )} \arctan \left (-\frac {13 \, \left (\frac {4}{13}\right )^{\frac {3}{4}} {\left (2 \, \left (\frac {4}{13}\right )^{\frac {1}{4}} \sqrt {-\frac {1}{13} \, \sqrt {13} + \frac {1}{2}} - \frac {\sqrt {2} \sqrt {\tan \left (d x + c\right )} - \sqrt {3}}{\sqrt {-2 \, \tan \left (d x + c\right ) + 3}} + \frac {\sqrt {-2 \, \tan \left (d x + c\right ) + 3}}{\sqrt {2} \sqrt {\tan \left (d x + c\right )} - \sqrt {3}}\right )}}{8 \, \sqrt {\frac {1}{13} \, \sqrt {13} + \frac {1}{2}}}\right )}{d^{3}} + \frac {{\left (3 \, d^{2} \sqrt {169 \, \sqrt {13} + 598} + 2 \, d \sqrt {169 \, \sqrt {13} - 598} {\left | d \right |}\right )} \log \left ({\left (\frac {\sqrt {2} \sqrt {\tan \left (d x + c\right )} - \sqrt {3}}{\sqrt {-2 \, \tan \left (d x + c\right ) + 3}} - \frac {\sqrt {-2 \, \tan \left (d x + c\right ) + 3}}{\sqrt {2} \sqrt {\tan \left (d x + c\right )} - \sqrt {3}}\right )}^{2} + 4 \, \left (\frac {4}{13}\right )^{\frac {1}{4}} \sqrt {-\frac {1}{13} \, \sqrt {13} + \frac {1}{2}} {\left (\frac {\sqrt {2} \sqrt {\tan \left (d x + c\right )} - \sqrt {3}}{\sqrt {-2 \, \tan \left (d x + c\right ) + 3}} - \frac {\sqrt {-2 \, \tan \left (d x + c\right ) + 3}}{\sqrt {2} \sqrt {\tan \left (d x + c\right )} - \sqrt {3}}\right )} + 8 \, \sqrt {\frac {1}{13}}\right )}{d^{3}} - \frac {{\left (3 \, d^{2} \sqrt {169 \, \sqrt {13} + 598} + 2 \, d \sqrt {169 \, \sqrt {13} - 598} {\left | d \right |}\right )} \log \left ({\left (\frac {\sqrt {2} \sqrt {\tan \left (d x + c\right )} - \sqrt {3}}{\sqrt {-2 \, \tan \left (d x + c\right ) + 3}} - \frac {\sqrt {-2 \, \tan \left (d x + c\right ) + 3}}{\sqrt {2} \sqrt {\tan \left (d x + c\right )} - \sqrt {3}}\right )}^{2} - 4 \, \left (\frac {4}{13}\right )^{\frac {1}{4}} \sqrt {-\frac {1}{13} \, \sqrt {13} + \frac {1}{2}} {\left (\frac {\sqrt {2} \sqrt {\tan \left (d x + c\right )} - \sqrt {3}}{\sqrt {-2 \, \tan \left (d x + c\right ) + 3}} - \frac {\sqrt {-2 \, \tan \left (d x + c\right ) + 3}}{\sqrt {2} \sqrt {\tan \left (d x + c\right )} - \sqrt {3}}\right )} + 8 \, \sqrt {\frac {1}{13}}\right )}{d^{3}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.68, size = 205, normalized size = 2.16 \begin {gather*} \mathrm {atan}\left (\frac {\sqrt {3}\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {\frac {1}{26}-\frac {3}{52}{}\mathrm {i}}{d^2}}\,\left (4+6{}\mathrm {i}\right )+d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {\frac {1}{26}-\frac {3}{52}{}\mathrm {i}}{d^2}}\,\sqrt {3-2\,\mathrm {tan}\left (c+d\,x\right )}\,\left (-4-6{}\mathrm {i}\right )}{2\,\mathrm {tan}\left (c+d\,x\right )+\sqrt {3}\,\sqrt {3-2\,\mathrm {tan}\left (c+d\,x\right )}-3}\right )\,\sqrt {\frac {\frac {1}{26}-\frac {3}{52}{}\mathrm {i}}{d^2}}\,2{}\mathrm {i}-\mathrm {atan}\left (\frac {\sqrt {3}\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {\frac {1}{26}+\frac {3}{52}{}\mathrm {i}}{d^2}}\,\left (4-6{}\mathrm {i}\right )+d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {\frac {1}{26}+\frac {3}{52}{}\mathrm {i}}{d^2}}\,\sqrt {3-2\,\mathrm {tan}\left (c+d\,x\right )}\,\left (-4+6{}\mathrm {i}\right )}{2\,\mathrm {tan}\left (c+d\,x\right )+\sqrt {3}\,\sqrt {3-2\,\mathrm {tan}\left (c+d\,x\right )}-3}\right )\,\sqrt {\frac {\frac {1}{26}+\frac {3}{52}{}\mathrm {i}}{d^2}}\,2{}\mathrm {i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________